package com.hzqy.persistence.dao.industry;

import com.hzqy.persistence.dao.core.PersistenceDao;
import com.hzqy.web.vo.CmContentVo;
import com.hzqy.web.vo.industry.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public class IndustryShangHaiDao extends PersistenceDao<C2BascHistryVo, Integer>{
	protected final Logger LOG = LoggerFactory.getLogger(getClass());

	public int selectPromiseRecordCount(CmPromiseRecordVo cmPromiseRecordVo) {
		String namespace = this.getNamespace();
		return getSqlSession().selectOne(namespace + "selectPromiseRecordCount", cmPromiseRecordVo);
	}

	public int selectAllPromiseRecordCount(CmPromiseRecordVo cmPromiseRecordVo) {
		return getSqlSession().selectOne(this.getNamespace() + "selectAllPromiseRecordCount", cmPromiseRecordVo);
	}

	public List<CmPromiseRecordVo> selectPromiseRecord(Map<String, Object> map) {
		return getSqlSession().selectList(this.getNamespace() + "selectPromiseRecord", map);
	}

	public int findContentCount(CmPromiseRecordVo cmPromiseRecordVo) {
		String namespace = this.getNamespace();
		return getSqlSession().selectOne(namespace + "findContentCount", cmPromiseRecordVo);
	}


	public List<CmPromiseRecordVo> selectAllPromiseRecord(Map<String, Object> map) {
		return getSqlSession().selectList(this.getNamespace() + "selectAllPromiseRecord", map);
	}

	public int deletePromiseRecord(int f_cpr_user_id) {
		return getSqlSession().update(this.getNamespace() + "deletePromiseRecord", f_cpr_user_id);
	}

	public int insertPic(CmPromiseRecordVo cmPromiseRecordVo) {
		return getSqlSession().insert(this.getNamespace() + "insertPic", cmPromiseRecordVo);
	}
	public int updatePic(CmPromiseRecordVo cmPromiseRecordVo) {
		return getSqlSession().insert(this.getNamespace() + "updatePic", cmPromiseRecordVo);
	}

	public int reviewContent(CmPromiseRecordVo cmPromiseRecordVo) {
		return getSqlSession().update(this.getNamespace() + "reviewContent",cmPromiseRecordVo);
	}

}

